
import request from '/@/utils/requestcopy';

export function getTemplateList(query:Object) {
    return request({
        url: '/templates/list',
        method: 'get',
        params:query
    })
}
export function rebuildTemplatetable(tableID:any) {
    return request({
        url: '/system/lkTemplate/rebuildtable/'+tableID,
        method: 'post',
    })
}
export function buildWithDing(dingcode:any) {
    return request({
        url: '/api/dingtalk/buildwithding/'+dingcode,
        method: 'get',
    })
}

export function addTemplate(data:Object) {
    return request({
        url: '/templates/add',
        method: 'post',
        data:data
    })
}
export function GetTemplateTable(id:any) {
    return request({
        url: '/template/'+id+'/tables',
        method: 'get',
    })
}
export function getTemplateInfo(code:any) {
    return request({
        url: '/templates/info/'+code,
        method: 'get',
    })
}

export function updateTemplate(data:Object) {
    return request({
        url: '/templates/update/base',
        method: 'put',
        data:data
    })
}


export function editTemplateTable(data:Object) {
    return request({
        url: '/templates/update/table',
        method: 'put',
        data:data
    })
}


